<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title></title>
</head>

<body>
    <div id="app"></div>
    <template id="txt">
        <div>
          <form @sunmit.prevent>
              <p>
                  username:
                  <input type="text" v-model.lazy.trim="username">
                  <!-- 事件触发后在将数据进行同步 首尾自动过滤空白字符 -->
                  {{username}}
              </p>
              <p>
                  <input type="radio" v-model="sex" value="1">boy
                  <input type="radio" v-model="sex" value="0">girl
                  {{sex}}
              </p>
              <p>
                  hobby:
                  <input type="checkbox" value="css" v-model="hobby">css
                  <input type="checkbox" value="js" v-model="hobby">js
                  <input type="checkbox" value="html" v-model="hobby">html
                  <input type="checkbox" value="vue" v-model="hobby">vue
              </p>
              <p>
                  {{hobby}}
              </p>
              <p>
                  <select v-model="city">
                      <option disabled value="请选择">请选择</option>
                      <option  value="东京">东京</option>
                      <option  value="南京">南京</option>
                      <option  value="西京">西京</option>
                      <option  value="北京">北京</option>
                  </select>
              </p>
              <p>{{city}}</p>
          </form>
        </div>
    </template>
</body>
<script src="/vue.min.js"></script>
<script>
    var vm = new Vue({
        el: '#app',
        template: '#txt',
        data: function () {
            return {
                number: '1',
                username:'make',
                sex:1,
                hobby:['js'],
                city:'请选择'
            }
        },
        methods:{
        
            say:function(){
                console.log(event.target.innerHTML)//第一种不传之 获取原生对象的值
               
            }

        }
    })

</script>

</html>